fix: column sort indications reflect truth [MA-4062]#2808
fix: column sort indications reflect truth [MA-4062]#2808
Conversation
✅ Deploy Preview for kongponents-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
24952a5 to
7bb38fd
Compare
Preview package from this PR in consuming applicationIn consuming application project install preview version of kongponents generated by this PR: |
✅ Deploy Preview for kongponents ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kongponents ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| /** this property defines whether sort icon should be displayed next to the column header and whether the column header will emit sort event upon clicking on it */ | ||
| sortable?: boolean | ||
| /** When provided, determines the intial arrow direction on the column header, if more than one header has this value only the first is applied */ | ||
| initialSort?: 'asc' | 'desc' |
There was a problem hiding this comment.
There's already a sortColumnOrder prop exposed via tablePreferences - shouldn't that be sufficient?
| /** this property defines whether sort icon should be displayed next to the column header and whether the column header will emit sort event upon clicking on it */ | ||
| sortable?: boolean | ||
| /** When provided, determines the intial arrow direction on the column header, if more than one header has this value only the first is applied */ | ||
| initialSort?: 'asc' | 'desc' |
There was a problem hiding this comment.
There's already a sortColumnOrder prop exposed via tablePreferences - shouldn't that be sufficient?
| /** This property defines whether sort icon should be displayed next to the column header and whether the column header will emit sort event upon clicking on it */ | ||
| sortable?: boolean | ||
| /** When provided, determines the intial arrow direction on the column */ | ||
| initialSort?: SortColumnOrder |
There was a problem hiding this comment.
There's already a sortColumnOrder prop exposed via tablePreferences - shouldn't that be sufficient?
|
Issues this PR aimed to fix are being fixed in #2819 |
Satisfies MA-4062
I'm a little bit opinionated in this PR and I haven't run this past design. Very willing to change anything that's in here, particularly the style choices.
Issues that are addressed by this PR
Description of changes
To address those two concerns, I made two changes. First, we use a different icon to indicate that a column could be sorted. Second, you can provide an
initialSortin your header to make the arrow initialized in the direction you want it to appear.I haven't run these changes past design, so I'm happy to change anything about the styles of this.
Screenshots
arrow position on initial load
before
after
arrow position after clicking on a column
before
after
Initial load with the initialSort set to 'asc'